﻿using System;
using System.Collections.Generic;
using System.Text;
using SCG.TurboSprite;
using SCG.SolarVengeanceEngine;
using System.Drawing;

namespace SCG.SolarVengeance
{
    public class BlackHoleSprite : SpiralSprite
    {
        //Constructor
        public BlackHoleSprite(BlackHole bh) : 
            base(15, 5, 120, 100, SVGame.Random(8, 12), false, SVGame.Random(2, 5), Color.FromArgb(25, 255, 100, 0), Color.Yellow)
        {
            bh.Tag = this;
            _bh = bh;
        }

        //Render the BlackHole as radiating energy with increasingly dark center        
        public override void Render(Graphics g)
        {            
            if (!_bh.VisibleToCurrentPlayer)
                return;
            base.Render(g);
            int x1 = (int)(X - Surface.OffsetX);
            int y1 = (int)(Y - Surface.OffsetY);
            g.FillEllipse(Brushes.Black, x1 - 6, y1 - 6, 8, 8);
        }       
  
        //private members
        private BlackHole _bh;
    }
}
